import PropTypes from 'prop-types'
import { RightOutlined } from '@ant-design/icons'
import React, { memo } from 'react'
import { FooterWrapper } from './style'
import classNames from 'classnames'
import { useNavigate } from 'react-router-dom'

const SectionFooter = memo((props) => {
  const {name}=props
  const navigate = useNavigate()
  function navigateTo(){
    navigate('/entire')
  }
  // useEffect({})
  return (
    <FooterWrapper >
      <div className={classNames("info", { colorSecondary: name })} onClick={navigateTo}>
        <span className="text">{name ? `查看更多${name}房源` :'查看全部'}</span>
        <RightOutlined className='more' />
      </div>
    </FooterWrapper>
  )
})

SectionFooter.propTypes = {
  name:PropTypes.string
}

export default SectionFooter